<template>
	<div class="contanis" style="background: #eee; padding-top: 10px;">
		 <div class="shop_verify-item" v-for="(item) in list">
			  <div class="shop_logo"></div>
			  <div class="shop_info">
				   <div class="shop-info-row title">门店名称:捷安特授权店</div>
				   <div class="shop-info-row">手机号：{{item['name']}}</div>
				   <div class="shop-info-row">门店地址:{{item['province']}}{{item['city']}}{{item['region']}}{{item['address']}}</div>
			  </div>
			  <div class="shop_apply">申请时间: {{item['createTime']}}</div>
			  <div class="shop_verify-btn"> <span @click="handleVerify(item['id'],false)">拒绝</span> <span @click="handleVerify(item['id'],true)">同意</span></div>
		 </div>
	</div>
</template>

<script>
	import { verifylist , verifyDo } from '../../../api/index.js';
	export default {
	  components:{
	  },
	  data(){
		 return {
			 list:[],
			 host:this.$domain
		 }
	  },
	  onShow() {
		
	  },
	  created(){
		  this.getVerifyList();
	  },
	  mounted(){
	  },
	  methods:{
		  getVerifyList(){
			 verifylist().then(res=>{
				this.list = res.data; 
			 }) 
		  },
		  handleVerify(id,status){
			  console.log(status,'333');
			  var opName = status==false?'拒绝':'通过';
			  uni.showModal({
			  	title:"您确认要执行"+opName+'操作吗？',
				success(res) {
					verifyDo({status:status,id:id}).then(res=>{
						if (res.code==200){
							uni.showToast({
								icon:'none',
								title:res.msg,
							});
						}
					})
				}
			  })
		  }
	  },
	};
</script>

<style>
	.shop_verify-item { width: 95%; height: auto; margin: 0 auto; margin-bottom: 10px; background: #fff; border-radius:5px;}
	.shop_logo { display: inline-block; vertical-align: top; width: 90px; height: 90px; margin: 10px; background: yellow;} 
	.shop_info { display: inline-block; width: auto; padding-top: 10px;}
	.title { height: 30px; line-height: 30px; font-size: 18px!important; color: black!important;}
	.shop-info-row { font-size: 13px; color: #666;}
	.shop_apply { text-align: right; font-size: 13px; color: #666; padding-right: 10px;}
	.shop_verify-btn { width: 100%; height: 30px; text-align: center; margin-top: 20px;}
	.shop_verify-btn span { width: 40px; height: 30px; font-size: 13px; padding: 5px; margin: 0 50px; border-radius: 5px; color: #fff; background: red;}
</style>